<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box1,.box2,.box3{
      padding: 50px;
    }
    .box1{
      background-color: rgb(143, 39, 39);
    }
    .box2{
      background-color: rgb(133, 152, 195);
    }
    .box3{
      background-color: rgb(197, 216, 194);
    }
  </style>
</head>
<body>
  <div id="app">
    <div class="box1" @click="fn1(1)">
      <div class="box2" @click="fn2(2)">
        <div class="box3" @click.stop="fn3(3)"></div>
      </div>
    </div>
    <hr>
    <div class="box1" @click="fn1(1)">
      <div class="box2" @click.capture="fn2(2)">
        <div class="box3" @click="fn3(3)"></div>
      </div>
    </div>
    <hr>
    <a @click.prevent href="http://www.baidu.com">百度一下</a>
    <button @click.once="clickBtn">绑定一次</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    
    const vm = new Vue({
      el: '#app',
      
      methods: {
       
        fn3(n){
          console.log(n);
          
        },
        fn2(n){
          console.log(n);
        },
        fn1(n){
          console.log(n);
        },
        clickBtn(){
          alert(1)
        }
      }
    })
    
  </script>
</body>
</html>